<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:util="http://java.sun.com/jsf/composite/components/util"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:c="http://java.sun.com/jsp/jstl/core"
                xmlns:p="http://primefaces.prime.com.tr/ui" 
                xmlns:f="http://java.sun.com/jsf/core">

    <div id="searchRes">
        <h:form id="searchResForm">
        <p:dataTable id="searchResDataTable" var="user" value="#{searchResultsBackingBean.users}"
            paginator="true" rows="10"
            selection="#{searchResultsBackingBean.selectedUser}"
            selectionMode="single"
            paginatorAlwaysVisible="false"
            rowSelectListener="#{searchResultsBackingBean.navigate}"
            update="clientid">
            
            <p:column>
                <h:graphicImage id="searchResImage" url="#{user.profilePic}"/>
            </p:column>
            
            <p:column sortBy="#{user.username}">
                <f:facet name="header">
                    <h:outputText value="#{msg.searchResultsUsername}" />
                </f:facet>
                <h:outputText value="#{user.username}" />
            </p:column>
            
            <p:column sortBy="#{user.userProperties.birthDate}">
                <f:facet name="header">
                    <h:outputText value="#{msg.searchResultsAge}" />
                </f:facet>
            <h:outputText value="#{user.userProperties.age}" />
            </p:column>
            
        </p:dataTable>
        </h:form>
    </div>
</ui:composition>   